﻿










--  查询设备信息
CREATE procedure [dbo].[SbInfo_Get]
@sblsh int=null,
@sblx  int = null
as
SELECT [sblsh]
      ,[sbbs]
      ,[sbh]
      ,[sbyt]
      ,[sblx]
	  ,[kzlx]
      ,[ljlx]
      ,[comip]
      ,[bddk]
,case [sbyt] when 0 then '门禁' when 1 then '通用' when 2 then '培训' else '未知' end sbyt_desc,
case sblx when 0 then 'FXZKTFT' when 1 then 'FXGAD' when 2 then 'FXLED' when 3 then 'FXDVR' when 4 then 'FXXZ' when 5 then 'FXFD' when 6 then 'FXCCC' when 7 then 'FXZKBW' when 8 then 'FXZKM8' when 9 then 'FC001' when 10 then 'FXZKFACE' else 'other' end sblx_desc,
case ljlx when 0 then 'RS232/RS485' when 1 then 'TCP/IP ' else 'USB' end ljlx_desc
  FROM Sb_Info
where  (@sblsh is null or [sblsh]=@sblsh) and (@sblx is null or [sblx]=@sblx)